package com.aiguigu.gulimall.auth.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 
 * @ClassName GuliMallWebConfig
 * @Description 使用springMvc viewController： 将请求映射过来
 * @Author xufb
 * @Date 2023/10/22 16:03:14
 * @Version 1.0
 */
@Configuration
public class GuliMallWebConfig implements WebMvcConfigurer {

    /**
     * 视图映射：请求映射视图
     * 使用GET请求访问
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/reg.html").setViewName("reg");
        registry.addViewController("/").setViewName("login");
    }
}
